<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: src/Socket.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Socket.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_socket_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This file is part of libemb.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libemb is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * libemb is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * along with libemb.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * Project: Embedme</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * Author : FergusZeng</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * Email  : cblock@126.com</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * git    : https://gitee.com/newgolo/embedme.git</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * Copyright 2014~2020 @ ShenZhen ,China</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">*******************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __SOCKET_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __SOCKET_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_base_type_8h.html">BaseType.h</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_thread_8h.html">Thread.h</a>&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_thread_util_8h.html">ThreadUtil.h</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;sys/types.h&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;sys/socket.h&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;sys/un.h&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;netinet/in.h&gt;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;net/if.h&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;linux/can.h&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;linux/can/raw.h&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">namespace </span>libemb{</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#define UDP_PACKET_LEN_MAX  1472    </span><span class="comment">/* UDP包最大长度 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="_socket_8h.html#abfb83d2705bcf8a1b4407e954ca7698b">   51</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_socket_8h.html#abfb83d2705bcf8a1b4407e954ca7698b">SOCKET_OPTION_E</a></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;{</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    SOCKET_OPTION_CASTTYPE, <span class="comment">/* 发送方式 */</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    SOCKET_OPTION_RCVBUF,   <span class="comment">/* 接收窗口大小 */</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    SOCKET_OPTION_SNDBUF,   <span class="comment">/* 发送窗口大小 */</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    SOCKET_OPTION_CANBTR,   <span class="comment">/* CAN 波特率 */</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    SOCKET_OPTION_UNKNOWN=0xFF,</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;};</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169">   64</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169">SOCKET_TYPE_E</a></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;{</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a37dd77135788444b993fe441d59492d2">   66</a></span>&#160;    <a class="code" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a37dd77135788444b993fe441d59492d2">SOCKET_TYPE_BROADCAST</a>,  </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a2296d85c7a3c2e448263e386bcf3aff0">   67</a></span>&#160;    <a class="code" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a2296d85c7a3c2e448263e386bcf3aff0">SOCKET_TYPE_GROUPCAST</a>,  </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a1129ad1d72fa46342dc8832a051a72b5">   68</a></span>&#160;    <a class="code" href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a1129ad1d72fa46342dc8832a051a72b5">SOCKET_TYPE_MULTICAST</a>,  </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;};</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9f">   75</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9f">TCP_LINK_E</a></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;{</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9faa12562e25caa49570374e4ecc3d4fd1b">   77</a></span>&#160;    <a class="code" href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9faa12562e25caa49570374e4ecc3d4fd1b">TCP_LINK_DISCONNECT</a>,    </div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9fa708dac20af16b7c56cf835aa90a29ce0">   78</a></span>&#160;    <a class="code" href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9fa708dac20af16b7c56cf835aa90a29ce0">TCP_LINK_CONNECTED</a>,     </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;};</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classlibemb_1_1_socket.html">   85</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_socket.html">Socket</a>{</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_socket.html">Socket</a>)</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="classlibemb_1_1_socket.html">Socket</a>();</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_socket.html">Socket</a>();</div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classlibemb_1_1_socket.html#a66ff2090729e8c677b9b74a8109f5c5e">   97</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket.html#a66ff2090729e8c677b9b74a8109f5c5e">open</a>(std::string localAddr=<span class="stringliteral">&quot;&quot;</span>,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort=0)=0;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket.html#abe56fbd2d9b7e679a2fa123d3477d541">close</a>();</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#adfdf7df8816e636aa1803d502b7451eb">readData</a>(<span class="keywordtype">char</span>* buf, <span class="keywordtype">int</span> len);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#a6b929e4664e4848e71647cd6494790a8">writeData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buf ,<span class="keywordtype">int</span> len);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#a61157046df06f3b1b3966d1451223371">peekData</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#a953d731417a7e9a389080f407fe38543">recvData</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#afdc396d85918fa1244322275d5612eca">sendData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len,<span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#aeb541b16c73f02af6a554e745787f9d0">setOption</a>(<span class="keywordtype">int</span> socketOpt, <span class="keywordtype">int</span> value);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#a10c54ec0c3c3652b2ea89767188c0b1b">getOption</a>(<span class="keywordtype">int</span> socketOpt);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket.html#a5488b24c864a510fa9a6e2629d8f98dd">setConnection</a>(std::string peerAddr,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> peerPort);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket.html#a17a82617775b44045f63455cbecf51e4">getConnection</a>(std::string&amp; peerAddr,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a>&amp; peerPort);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket.html#a701a6b1d84bfc872a4a9bc57c5005e6b">isAlive</a>();</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#a82bea326e166ec56d8e2d8f3613a2285">fd</a>();</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket.html#a39054e054af1de05a02f4d460298f4d6">fdopen</a>(<span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket.html#a82bea326e166ec56d8e2d8f3613a2285">fd</a>);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket.html#aa3bb309e51bff6547c035e0d6b7c3e6a">bindPort</a>(<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort, std::string localAddr=<span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    std::string m_peerAddr{<span class="stringliteral">&quot;&quot;</span>};</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> m_peerPort{0};</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keywordtype">int</span> m_sockfd{-1};</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keyword">struct </span>sockaddr_in m_localSockAddr;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;};</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="classlibemb_1_1_udp_socket.html">  203</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_udp_socket.html">UdpSocket</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_socket.html">Socket</a>{</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_udp_socket.html">UdpSocket</a>)</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <a class="code" href="classlibemb_1_1_udp_socket.html">UdpSocket</a>();</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_udp_socket.html">UdpSocket</a>();</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_udp_socket.html#a68ff88290edd13f8093f61d405f4020c">open</a>(std::string localAddr=<span class="stringliteral">&quot;&quot;</span>,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort=0);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_udp_socket.html#a4f2044f857353eecec12865ea3fffc90">close</a>();</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_udp_socket.html#a194c4197a7db27728ec2ea239a5fb695">readData</a>(<span class="keywordtype">char</span>* buf, <span class="keywordtype">int</span> len);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_udp_socket.html#a273ded5a5087037e54632f148f080f7a">writeData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buf ,<span class="keywordtype">int</span> len);</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_udp_socket.html#a992f02a6286ddfc53441b56a01c11eb1">recvData</a>(<span class="keywordtype">char</span>* buf,<span class="keywordtype">int</span> len,<span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_udp_socket.html#ac2c319002a9a7c2e945b9a337f79e031">sendData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buf,<span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout=-1);    </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;};</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160; </div>
<div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="classlibemb_1_1_tcp_socket.html">  257</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_tcp_socket.html">TcpSocket</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_socket.html">Socket</a>{</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_tcp_socket.html">TcpSocket</a>)</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <a class="code" href="classlibemb_1_1_tcp_socket.html">TcpSocket</a>();</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_tcp_socket.html">TcpSocket</a>();</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_tcp_socket.html#a5dc124f593f6e6e15e3de961290e9009">open</a>(std::string localAddr=<span class="stringliteral">&quot;&quot;</span>,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort=0);</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_tcp_socket.html#a8c944c3e70eaef24dedfadf10c9a1116">close</a>();</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_tcp_socket.html#ab2ce1e4be93793c2597dd2a70b9762dc">listenConnection</a>(<span class="keywordtype">int</span> maxpend);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_tcp_socket.html#a48c025a2638d3606b8b966f2325e001f">acceptConnection</a>(<a class="code" href="classlibemb_1_1_tcp_socket.html">TcpSocket</a>&amp; newSocket);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_tcp_socket.html#a7b4313971813566b203ad2cfc03278c0">setConnection</a>(std::string peerAddr,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> peerPort);</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;};</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160; </div>
<div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="classlibemb_1_1_local_tcp_socket.html">  305</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_local_tcp_socket.html">LocalTcpSocket</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_tcp_socket.html">TcpSocket</a>{</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_local_tcp_socket.html">LocalTcpSocket</a>)</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    <a class="code" href="classlibemb_1_1_local_tcp_socket.html">LocalTcpSocket</a>();</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_local_tcp_socket.html">LocalTcpSocket</a>();</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_local_tcp_socket.html#a001362c03715e2a34e3efca0483508ab">open</a>(std::string localSocketName=<span class="stringliteral">&quot;&quot;</span>,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort=0);</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_local_tcp_socket.html#adaa208f6e9930bf4583aa3e15aecc495">acceptConnection</a>(<a class="code" href="classlibemb_1_1_tcp_socket.html">TcpSocket</a>&amp; newSocket);</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_local_tcp_socket.html#a2c783361f400e753701d54d69388fd0c">setConnection</a>(std::string peerAddr,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> peerPort);</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    </div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    std::string m_socketName{<span class="stringliteral">&quot;&quot;</span>};</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    std::string m_peerName{<span class="stringliteral">&quot;&quot;</span>};</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;};</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160; </div>
<div class="line"><a name="l00342"></a><span class="lineno"><a class="line" href="classlibemb_1_1_udp_server.html">  342</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_udp_server.html">UdpServer</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_runnable.html">Runnable</a>{</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_udp_server.html">UdpServer</a>)</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    <a class="code" href="classlibemb_1_1_udp_server.html">UdpServer</a>();</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_udp_server.html">UdpServer</a>();</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_udp_server.html#a4d3b79584e8e1c759a8004dbe71c27c4">setup</a>(std::string serverIP,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> serverPort);</div>
<div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="classlibemb_1_1_udp_server.html#a01676fb42c3309a6367f65486feb5db6">  363</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_udp_server.html#a01676fb42c3309a6367f65486feb5db6">onNewDatagram</a>(<a class="code" href="classlibemb_1_1_udp_socket.html">UdpSocket</a>&amp; udpSocket,<span class="keywordtype">char</span>* data, <span class="keywordtype">int</span> len)=0;</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    <span class="keywordtype">void</span> run(); </div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <a class="code" href="classlibemb_1_1_udp_socket.html">UdpSocket</a> m_serverSocket;</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    <span class="keywordtype">bool</span> m_stopFlag{<span class="keyword">false</span>};</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;};</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160; </div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160; </div>
<div class="line"><a name="l00376"></a><span class="lineno"><a class="line" href="classlibemb_1_1_tcp_server.html">  376</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_tcp_server.html">TcpServer</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_runnable.html">Runnable</a>{</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_tcp_server.html">TcpServer</a>)</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <a class="code" href="classlibemb_1_1_tcp_server.html">TcpServer</a>();</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_tcp_server.html">TcpServer</a>();</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_tcp_server.html#aa221792db3671ea0d0ed7f2e4ac6dc24">setup</a>(std::string serverIP,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> serverPort,<span class="keywordtype">int</span> maxPendings=1);</div>
<div class="line"><a name="l00396"></a><span class="lineno"><a class="line" href="classlibemb_1_1_tcp_server.html#a753689163dc824f7458c3cd3eb2dd622">  396</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_tcp_server.html#a753689163dc824f7458c3cd3eb2dd622">onNewConnection</a>(std::unique_ptr&lt;TcpSocket&gt; client)=0;</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keywordtype">void</span> run();</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;    <span class="keywordtype">bool</span> m_stopFlag{<span class="keyword">false</span>};</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    std::unique_ptr&lt;TcpSocket&gt; m_serverSocket;</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;};</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160; </div>
<div class="line"><a name="l00408"></a><span class="lineno"><a class="line" href="classlibemb_1_1_local_tcp_server.html">  408</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_local_tcp_server.html">LocalTcpServer</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_tcp_server.html">TcpServer</a>{</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_local_tcp_server.html">LocalTcpServer</a>)</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    <a class="code" href="classlibemb_1_1_local_tcp_server.html">LocalTcpServer</a>();</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_local_tcp_server.html">LocalTcpServer</a>();</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_local_tcp_server.html#a12b9aed57b22af9959b34cd489e80369">setup</a>(std::string serverName,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> serverPort,<span class="keywordtype">int</span> maxPendings=1);</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    <span class="keywordtype">void</span> run();</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;};</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160; </div>
<div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="classlibemb_1_1_socket_pair.html">  430</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_socket_pair.html">SocketPair</a>{</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_socket_pair.html">SocketPair</a>)</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;    <span class="keyword">enum</span>{</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;    PAIRFD_READ=0,</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;    PAIRFD_WRITE=1,</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;    }PAIRFD_TYPE_E; </div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    <a class="code" href="classlibemb_1_1_socket_pair.html">SocketPair</a>();</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;    ~<a class="code" href="classlibemb_1_1_socket_pair.html">SocketPair</a>();</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket_pair.html#ad4f3980a76dc4294661ecf69be060eeb">createPair</a>();</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket_pair.html#aaac5188895918b4eb0acab1e8d055de0">fd</a>(<span class="keywordtype">int</span> pairType);</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket_pair.html#aad72de25942fecf8acd46c1b5da3b753">recvData</a>(<span class="keywordtype">char</span>* buf,<span class="keywordtype">int</span> len,<span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket_pair.html#a78c408b8e60c49e8543abe75ea8eeec6">sendData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buf,<span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;    <span class="keywordtype">int</span> m_fd[2]{-1,-1};</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;};</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160; </div>
<div class="line"><a name="l00480"></a><span class="lineno"><a class="line" href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fd">  480</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fd">CAN_FF_E</a></div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;{</div>
<div class="line"><a name="l00482"></a><span class="lineno"><a class="line" href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fda0bd4206f31c71fa2b710aa89781d8ab4">  482</a></span>&#160;    <a class="code" href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fda0bd4206f31c71fa2b710aa89781d8ab4">CAN_FF_STD</a>=0,</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    <a class="code" href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fdadf4c53f6abb5e273e9c6c6e202e5e6e0">CAN_FF_EXT</a>   </div>
<div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fdadf4c53f6abb5e273e9c6c6e202e5e6e0">  484</a></span>&#160;};</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160; </div>
<div class="line"><a name="l00490"></a><span class="lineno"><a class="line" href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fca">  490</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fca">CAN_FT_E</a></div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;{</div>
<div class="line"><a name="l00492"></a><span class="lineno"><a class="line" href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fcaa0ac739b57bc6d42d9ff382ede534f9f6">  492</a></span>&#160;    <a class="code" href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fcaa0ac739b57bc6d42d9ff382ede534f9f6">CAN_FT_DATA</a>=0,  </div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    <a class="code" href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fcaac8da34c8eadb05e544baedf8c2532fd6">CAN_FT_REMOTE</a>   </div>
<div class="line"><a name="l00494"></a><span class="lineno"><a class="line" href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fcaac8da34c8eadb05e544baedf8c2532fd6">  494</a></span>&#160;};</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160; </div>
<div class="line"><a name="l00500"></a><span class="lineno"><a class="line" href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473">  500</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473">CAN_FE_E</a></div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;{</div>
<div class="line"><a name="l00502"></a><span class="lineno"><a class="line" href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473aaccb0e77a519b3216ce2fa300c69a938">  502</a></span>&#160;    <a class="code" href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473aaccb0e77a519b3216ce2fa300c69a938">CAN_FE_NONE</a>=0,  </div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;    <a class="code" href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473a0844ba595fcce9692c0dfa1abb3bad45">CAN_FE_ERR</a>      </div>
<div class="line"><a name="l00504"></a><span class="lineno"><a class="line" href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473a0844ba595fcce9692c0dfa1abb3bad45">  504</a></span>&#160;};</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160; </div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;<span class="keyword">class </span>SocketCAN;</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160; </div>
<div class="line"><a name="l00512"></a><span class="lineno"><a class="line" href="classlibemb_1_1_c_a_n_frame.html">  512</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>{</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;    <a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>();</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;    <a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>(<a class="code" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a2ec1810218164334e41fa8c8ab5e23b6">canid</a>,<span class="keywordtype">char</span>* <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a876fcebd111b67cbdb9f41a66722915f">data</a>,<a class="code" href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">uint8</a> len);</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    <a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>(<a class="code" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> <span class="keywordtype">id</span>,<span class="keywordtype">char</span>* <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a876fcebd111b67cbdb9f41a66722915f">data</a>,<a class="code" href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">uint8</a> len,<a class="code" href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">uint8</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#aebbf7eadd5abaf28ae3260947674b607">format</a>);</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;    ~<a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>();</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    <a class="code" href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">uint8</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#aebbf7eadd5abaf28ae3260947674b607">format</a>();</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;    <a class="code" href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">uint8</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#ae0c92ba7b884be4d9a35e6db4bf6332c">type</a>();</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;    <a class="code" href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">uint8</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a82fc12322f701770a392b46c623e6fa6">error</a>();</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;    <a class="code" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a5e7e0059049f843dd1c01ac8737268fe">id</a>();</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;    <a class="code" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a2ec1810218164334e41fa8c8ab5e23b6">canid</a>();</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    <a class="code" href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">uint8</a> <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a9209fc6539db6a51c71a60b93b5f6d9d">dataLen</a>();</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;    <span class="keywordtype">char</span>* <a class="code" href="classlibemb_1_1_c_a_n_frame.html#a876fcebd111b67cbdb9f41a66722915f">data</a>();</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classlibemb_1_1_socket_c_a_n.html">SocketCAN</a>;</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    <span class="keyword">struct </span>can_frame m_frame;</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;};</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160; </div>
<div class="line"><a name="l00576"></a><span class="lineno"><a class="line" href="classlibemb_1_1_socket_c_a_n.html">  576</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_socket_c_a_n.html">SocketCAN</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_socket.html">Socket</a>{</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_socket_c_a_n.html">SocketCAN</a>)</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;    <a class="code" href="classlibemb_1_1_socket_c_a_n.html">SocketCAN</a>();</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_socket_c_a_n.html">SocketCAN</a>();</div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;    std::string <a class="code" href="classlibemb_1_1_socket_c_a_n.html#a96672c6ab59aa802b89dec841e06e3cf">interface</a>();</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket_c_a_n.html#a9d22e63de72acc671b452f13890471bf">open</a>(std::string canName=<span class="stringliteral">&quot;&quot;</span>,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort=0);</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_socket_c_a_n.html#af29500cf81996e67ceaf210fa80c4e33">close</a>();</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket_c_a_n.html#a32a48b875a74cf0571f8d3a841a0271b">recvFrame</a>(<a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>&amp; canFrame,<span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket_c_a_n.html#acd41e727984c489b7e401e3f8cffeba5">sendFrame</a>(<a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>&amp; canFrame,<span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00619"></a><span class="lineno"><a class="line" href="classlibemb_1_1_socket_c_a_n.html#a96f512a12482408448c8c7d6dfbbc5d3">  619</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket_c_a_n.html#a96f512a12482408448c8c7d6dfbbc5d3">readFrame</a>(<a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>&amp; canFrame);</div>
<div class="line"><a name="l00625"></a><span class="lineno"><a class="line" href="classlibemb_1_1_socket_c_a_n.html#a086ee3480de9f5d0cf8bc3cf93ffb676">  625</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_socket_c_a_n.html#a086ee3480de9f5d0cf8bc3cf93ffb676">writeFrame</a>(<a class="code" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a>&amp; canFrame);</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;    <span class="keywordtype">int</span> recvData(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;    <span class="keywordtype">int</span> sendData(<span class="keyword">const</span> <span class="keywordtype">char</span> *data, <span class="keywordtype">int</span> len,<span class="keywordtype">int</span> usTimeout=-1);</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;    <span class="keywordtype">int</span> peekData(<span class="keywordtype">char</span> * buf, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> usTimeout){<span class="keywordflow">return</span> <a class="code" href="_base_type_8h.html#a717a72a543bb648f05c09a72862ea673a2b6da99bcd572ee55d3cd6b9cfb74500">RC_ERROR</a>;}</div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;    <span class="keywordtype">bool</span> setConnection(std::string peerAddr,<a class="code" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> peerPort){<span class="keywordflow">return</span> <span class="keyword">false</span>;} </div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;    <span class="keywordtype">int</span> setOption(<span class="keywordtype">int</span> socketOpt, <span class="keywordtype">int</span> value){<span class="keywordflow">return</span> RC_ERROR;}</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;    <span class="keywordtype">int</span> getOption(<span class="keywordtype">int</span> socketOpt){<span class="keywordflow">return</span> <a class="code" href="_base_type_8h.html#a717a72a543bb648f05c09a72862ea673a2b6da99bcd572ee55d3cd6b9cfb74500">RC_ERROR</a>;}</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;    std::string m_interface{<span class="stringliteral">&quot;&quot;</span>};</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;};</div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160; </div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;}</div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="a_socket_8h_html_a3311cfe4e996dc9a38e7648f9cbe3e9fa708dac20af16b7c56cf835aa90a29ce0"><div class="ttname"><a href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9fa708dac20af16b7c56cf835aa90a29ce0">libemb::TCP_LINK_CONNECTED</a></div><div class="ttdeci">@ TCP_LINK_CONNECTED</div><div class="ttdef"><b>Definition:</b> Socket.h:78</div></div>
<div class="ttc" id="aclasslibemb_1_1_local_tcp_socket_html_adaa208f6e9930bf4583aa3e15aecc495"><div class="ttname"><a href="classlibemb_1_1_local_tcp_socket.html#adaa208f6e9930bf4583aa3e15aecc495">libemb::LocalTcpSocket::acceptConnection</a></div><div class="ttdeci">bool acceptConnection(TcpSocket &amp;newSocket)</div><div class="ttdoc">接受连接</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1003</div></div>
<div class="ttc" id="a_socket_8h_html_a3311cfe4e996dc9a38e7648f9cbe3e9faa12562e25caa49570374e4ecc3d4fd1b"><div class="ttname"><a href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9faa12562e25caa49570374e4ecc3d4fd1b">libemb::TCP_LINK_DISCONNECT</a></div><div class="ttdeci">@ TCP_LINK_DISCONNECT</div><div class="ttdef"><b>Definition:</b> Socket.h:77</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_pair_html"><div class="ttname"><a href="classlibemb_1_1_socket_pair.html">libemb::SocketPair</a></div><div class="ttdoc">套接字对类</div><div class="ttdef"><b>Definition:</b> Socket.h:430</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_abe56fbd2d9b7e679a2fa123d3477d541"><div class="ttname"><a href="classlibemb_1_1_socket.html#abe56fbd2d9b7e679a2fa123d3477d541">libemb::Socket::close</a></div><div class="ttdeci">virtual bool close()</div><div class="ttdoc">关闭socket</div><div class="ttdef"><b>Definition:</b> Socket.cpp:111</div></div>
<div class="ttc" id="a_socket_8h_html_a3311cfe4e996dc9a38e7648f9cbe3e9f"><div class="ttname"><a href="_socket_8h.html#a3311cfe4e996dc9a38e7648f9cbe3e9f">libemb::TCP_LINK_E</a></div><div class="ttdeci">TCP_LINK_E</div><div class="ttdoc">定义tcp连接状态</div><div class="ttdef"><b>Definition:</b> Socket.h:76</div></div>
<div class="ttc" id="a_socket_8h_html_aa6016addaf077c4dd5dcf11f8def4169"><div class="ttname"><a href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169">libemb::SOCKET_TYPE_E</a></div><div class="ttdeci">SOCKET_TYPE_E</div><div class="ttdoc">定义socket的类型</div><div class="ttdef"><b>Definition:</b> Socket.h:65</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_server_html"><div class="ttname"><a href="classlibemb_1_1_udp_server.html">libemb::UdpServer</a></div><div class="ttdoc">UDP服务器</div><div class="ttdef"><b>Definition:</b> Socket.h:342</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_adfdf7df8816e636aa1803d502b7451eb"><div class="ttname"><a href="classlibemb_1_1_socket.html#adfdf7df8816e636aa1803d502b7451eb">libemb::Socket::readData</a></div><div class="ttdeci">virtual int readData(char *buf, int len)</div><div class="ttdoc">读取数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:122</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a953d731417a7e9a389080f407fe38543"><div class="ttname"><a href="classlibemb_1_1_socket.html#a953d731417a7e9a389080f407fe38543">libemb::Socket::recvData</a></div><div class="ttdeci">virtual int recvData(char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">socket接收数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:247</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a82bea326e166ec56d8e2d8f3613a2285"><div class="ttname"><a href="classlibemb_1_1_socket.html#a82bea326e166ec56d8e2d8f3613a2285">libemb::Socket::fd</a></div><div class="ttdeci">int fd()</div><div class="ttdoc">获取端口fd</div><div class="ttdef"><b>Definition:</b> Socket.cpp:482</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_server_html"><div class="ttname"><a href="classlibemb_1_1_tcp_server.html">libemb::TcpServer</a></div><div class="ttdoc">Tcp服务器</div><div class="ttdef"><b>Definition:</b> Socket.h:376</div></div>
<div class="ttc" id="a_base_type_8h_html_a717a72a543bb648f05c09a72862ea673a2b6da99bcd572ee55d3cd6b9cfb74500"><div class="ttname"><a href="_base_type_8h.html#a717a72a543bb648f05c09a72862ea673a2b6da99bcd572ee55d3cd6b9cfb74500">libemb::RC_ERROR</a></div><div class="ttdeci">@ RC_ERROR</div><div class="ttdef"><b>Definition:</b> BaseType.h:85</div></div>
<div class="ttc" id="aclasslibemb_1_1_local_tcp_socket_html"><div class="ttname"><a href="classlibemb_1_1_local_tcp_socket.html">libemb::LocalTcpSocket</a></div><div class="ttdoc">LocalTcpSocket类</div><div class="ttdef"><b>Definition:</b> Socket.h:305</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_server_html_a4d3b79584e8e1c759a8004dbe71c27c4"><div class="ttname"><a href="classlibemb_1_1_udp_server.html#a4d3b79584e8e1c759a8004dbe71c27c4">libemb::UdpServer::setup</a></div><div class="ttdeci">bool setup(std::string serverIP, uint16 serverPort)</div><div class="ttdoc">配置服务</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1029</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_socket_html_a992f02a6286ddfc53441b56a01c11eb1"><div class="ttname"><a href="classlibemb_1_1_udp_socket.html#a992f02a6286ddfc53441b56a01c11eb1">libemb::UdpSocket::recvData</a></div><div class="ttdeci">int recvData(char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">UDP socket接收数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:605</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html_a96f512a12482408448c8c7d6dfbbc5d3"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html#a96f512a12482408448c8c7d6dfbbc5d3">libemb::SocketCAN::readFrame</a></div><div class="ttdeci">int readFrame(CANFrame &amp;canFrame)</div><div class="ttdoc">读取帧</div></div>
<div class="ttc" id="a_socket_8h_html_afd4a8a04b314fddd93de6f9df6ce83fd"><div class="ttname"><a href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fd">libemb::CAN_FF_E</a></div><div class="ttdeci">CAN_FF_E</div><div class="ttdoc">CAN帧格式</div><div class="ttdef"><b>Definition:</b> Socket.h:481</div></div>
<div class="ttc" id="a_socket_8h_html_abfb83d2705bcf8a1b4407e954ca7698b"><div class="ttname"><a href="_socket_8h.html#abfb83d2705bcf8a1b4407e954ca7698b">libemb::SOCKET_OPTION_E</a></div><div class="ttdeci">SOCKET_OPTION_E</div><div class="ttdoc">定义socket的可选项</div><div class="ttdef"><b>Definition:</b> Socket.h:52</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html_af29500cf81996e67ceaf210fa80c4e33"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html#af29500cf81996e67ceaf210fa80c4e33">libemb::SocketCAN::close</a></div><div class="ttdeci">bool close()</div><div class="ttdoc">关闭套接字</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1427</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_aeb541b16c73f02af6a554e745787f9d0"><div class="ttname"><a href="classlibemb_1_1_socket.html#aeb541b16c73f02af6a554e745787f9d0">libemb::Socket::setOption</a></div><div class="ttdeci">virtual int setOption(int socketOpt, int value)</div><div class="ttdoc">设置socket选项</div><div class="ttdef"><b>Definition:</b> Socket.cpp:372</div></div>
<div class="ttc" id="a_socket_8h_html_aa6016addaf077c4dd5dcf11f8def4169a37dd77135788444b993fe441d59492d2"><div class="ttname"><a href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a37dd77135788444b993fe441d59492d2">libemb::SOCKET_TYPE_BROADCAST</a></div><div class="ttdeci">@ SOCKET_TYPE_BROADCAST</div><div class="ttdef"><b>Definition:</b> Socket.h:66</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html_a9209fc6539db6a51c71a60b93b5f6d9d"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html#a9209fc6539db6a51c71a60b93b5f6d9d">libemb::CANFrame::dataLen</a></div><div class="ttdeci">uint8 dataLen()</div><div class="ttdoc">获取帧数据长度</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1370</div></div>
<div class="ttc" id="a_socket_8h_html_a6cd27f32d9a678153aa8786a83489473aaccb0e77a519b3216ce2fa300c69a938"><div class="ttname"><a href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473aaccb0e77a519b3216ce2fa300c69a938">libemb::CAN_FE_NONE</a></div><div class="ttdeci">@ CAN_FE_NONE</div><div class="ttdef"><b>Definition:</b> Socket.h:502</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a701a6b1d84bfc872a4a9bc57c5005e6b"><div class="ttname"><a href="classlibemb_1_1_socket.html#a701a6b1d84bfc872a4a9bc57c5005e6b">libemb::Socket::isAlive</a></div><div class="ttdeci">bool isAlive()</div><div class="ttdoc">判断端口是否活动</div><div class="ttdef"><b>Definition:</b> Socket.cpp:477</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a39054e054af1de05a02f4d460298f4d6"><div class="ttname"><a href="classlibemb_1_1_socket.html#a39054e054af1de05a02f4d460298f4d6">libemb::Socket::fdopen</a></div><div class="ttdeci">bool fdopen(int fd)</div><div class="ttdoc">通过fd打开端口</div><div class="ttdef"><b>Definition:</b> Socket.cpp:487</div></div>
<div class="ttc" id="a_base_type_8h_html_a01991db9cc388cf9815386e13465f332"><div class="ttname"><a href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">libemb::uint32</a></div><div class="ttdeci">unsigned int uint32</div><div class="ttdef"><b>Definition:</b> BaseType.h:76</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_server_html_aa221792db3671ea0d0ed7f2e4ac6dc24"><div class="ttname"><a href="classlibemb_1_1_tcp_server.html#aa221792db3671ea0d0ed7f2e4ac6dc24">libemb::TcpServer::setup</a></div><div class="ttdeci">virtual bool setup(std::string serverIP, uint16 serverPort, int maxPendings=1)</div><div class="ttdoc">服务配置</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1064</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html_a82fc12322f701770a392b46c623e6fa6"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html#a82fc12322f701770a392b46c623e6fa6">libemb::CANFrame::error</a></div><div class="ttdeci">uint8 error()</div><div class="ttdoc">获取帧错误</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1348</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a6b929e4664e4848e71647cd6494790a8"><div class="ttname"><a href="classlibemb_1_1_socket.html#a6b929e4664e4848e71647cd6494790a8">libemb::Socket::writeData</a></div><div class="ttdeci">virtual int writeData(const char *buf, int len)</div><div class="ttdoc">写入数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:149</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_socket_html_ab2ce1e4be93793c2597dd2a70b9762dc"><div class="ttname"><a href="classlibemb_1_1_tcp_socket.html#ab2ce1e4be93793c2597dd2a70b9762dc">libemb::TcpSocket::listenConnection</a></div><div class="ttdeci">virtual bool listenConnection(int maxpend)</div><div class="ttdoc">TCP socket监听连接</div><div class="ttdef"><b>Definition:</b> Socket.cpp:792</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_socket_html"><div class="ttname"><a href="classlibemb_1_1_udp_socket.html">libemb::UdpSocket</a></div><div class="ttdoc">UdpSocket类</div><div class="ttdef"><b>Definition:</b> Socket.h:203</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html">libemb::SocketCAN</a></div><div class="ttdoc">CAN套接字</div><div class="ttdef"><b>Definition:</b> Socket.h:576</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_aa3bb309e51bff6547c035e0d6b7c3e6a"><div class="ttname"><a href="classlibemb_1_1_socket.html#aa3bb309e51bff6547c035e0d6b7c3e6a">libemb::Socket::bindPort</a></div><div class="ttdeci">bool bindPort(uint16 localPort, std::string localAddr=&quot;&quot;)</div><div class="ttdoc">绑定socket到指定IP地址的端口上</div><div class="ttdef"><b>Definition:</b> Socket.cpp:68</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html_aebbf7eadd5abaf28ae3260947674b607"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html#aebbf7eadd5abaf28ae3260947674b607">libemb::CANFrame::format</a></div><div class="ttdeci">uint8 format()</div><div class="ttdoc">获取帧格式</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1338</div></div>
<div class="ttc" id="aclasslibemb_1_1_local_tcp_server_html"><div class="ttname"><a href="classlibemb_1_1_local_tcp_server.html">libemb::LocalTcpServer</a></div><div class="ttdoc">本地TCP服务器</div><div class="ttdef"><b>Definition:</b> Socket.h:408</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a5488b24c864a510fa9a6e2629d8f98dd"><div class="ttname"><a href="classlibemb_1_1_socket.html#a5488b24c864a510fa9a6e2629d8f98dd">libemb::Socket::setConnection</a></div><div class="ttdeci">virtual bool setConnection(std::string peerAddr, uint16 peerPort)</div><div class="ttdoc">设置连接(设置对端地址和端口)</div><div class="ttdef"><b>Definition:</b> Socket.cpp:460</div></div>
<div class="ttc" id="a_base_type_8h_html_aebf3b8d3c22313714b07d595cc3effac"><div class="ttname"><a href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">libemb::uint16</a></div><div class="ttdeci">unsigned short uint16</div><div class="ttdef"><b>Definition:</b> BaseType.h:75</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a10c54ec0c3c3652b2ea89767188c0b1b"><div class="ttname"><a href="classlibemb_1_1_socket.html#a10c54ec0c3c3652b2ea89767188c0b1b">libemb::Socket::getOption</a></div><div class="ttdeci">virtual int getOption(int socketOpt)</div><div class="ttdoc">获取socket选项</div><div class="ttdef"><b>Definition:</b> Socket.cpp:427</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_socket_html"><div class="ttname"><a href="classlibemb_1_1_tcp_socket.html">libemb::TcpSocket</a></div><div class="ttdoc">TcpSocket类</div><div class="ttdef"><b>Definition:</b> Socket.h:257</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html_a9d22e63de72acc671b452f13890471bf"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html#a9d22e63de72acc671b452f13890471bf">libemb::SocketCAN::open</a></div><div class="ttdeci">bool open(std::string canName=&quot;&quot;, uint16 localPort=0)</div><div class="ttdoc">打开套接字</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1392</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_socket_html_a68ff88290edd13f8093f61d405f4020c"><div class="ttname"><a href="classlibemb_1_1_udp_socket.html#a68ff88290edd13f8093f61d405f4020c">libemb::UdpSocket::open</a></div><div class="ttdeci">bool open(std::string localAddr=&quot;&quot;, uint16 localPort=0)</div><div class="ttdoc">打开UDP socket</div><div class="ttdef"><b>Definition:</b> Socket.cpp:510</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_server_html_a753689163dc824f7458c3cd3eb2dd622"><div class="ttname"><a href="classlibemb_1_1_tcp_server.html#a753689163dc824f7458c3cd3eb2dd622">libemb::TcpServer::onNewConnection</a></div><div class="ttdeci">virtual bool onNewConnection(std::unique_ptr&lt; TcpSocket &gt; client)=0</div><div class="ttdoc">TCP连接回调方法</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html_a086ee3480de9f5d0cf8bc3cf93ffb676"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html#a086ee3480de9f5d0cf8bc3cf93ffb676">libemb::SocketCAN::writeFrame</a></div><div class="ttdeci">int writeFrame(CANFrame &amp;canFrame)</div><div class="ttdoc">写入帧</div></div>
<div class="ttc" id="a_base_type_8h_html"><div class="ttname"><a href="_base_type_8h.html">BaseType.h</a></div><div class="ttdoc">基础类型头文件</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html_a2ec1810218164334e41fa8c8ab5e23b6"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html#a2ec1810218164334e41fa8c8ab5e23b6">libemb::CANFrame::canid</a></div><div class="ttdeci">uint32 canid()</div><div class="ttdoc">获取帧id(包括标志位)</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1365</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a61157046df06f3b1b3966d1451223371"><div class="ttname"><a href="classlibemb_1_1_socket.html#a61157046df06f3b1b3966d1451223371">libemb::Socket::peekData</a></div><div class="ttdeci">virtual int peekData(char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">socket查看缓冲区数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:183</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_socket_html_a5dc124f593f6e6e15e3de961290e9009"><div class="ttname"><a href="classlibemb_1_1_tcp_socket.html#a5dc124f593f6e6e15e3de961290e9009">libemb::TcpSocket::open</a></div><div class="ttdeci">virtual bool open(std::string localAddr=&quot;&quot;, uint16 localPort=0)</div><div class="ttdoc">打开TCP socket</div><div class="ttdef"><b>Definition:</b> Socket.cpp:760</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_socket_html_a273ded5a5087037e54632f148f080f7a"><div class="ttname"><a href="classlibemb_1_1_udp_socket.html#a273ded5a5087037e54632f148f080f7a">libemb::UdpSocket::writeData</a></div><div class="ttdeci">int writeData(const char *buf, int len)</div><div class="ttdoc">写数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:568</div></div>
<div class="ttc" id="a_socket_8h_html_ad8f08be509aac52cd594cfb88a7b2fca"><div class="ttname"><a href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fca">libemb::CAN_FT_E</a></div><div class="ttdeci">CAN_FT_E</div><div class="ttdef"><b>Definition:</b> Socket.h:491</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html_acd41e727984c489b7e401e3f8cffeba5"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html#acd41e727984c489b7e401e3f8cffeba5">libemb::SocketCAN::sendFrame</a></div><div class="ttdeci">int sendFrame(CANFrame &amp;canFrame, int usTimeout=-1)</div><div class="ttdoc">发送帧</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1448</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_socket_html_a48c025a2638d3606b8b966f2325e001f"><div class="ttname"><a href="classlibemb_1_1_tcp_socket.html#a48c025a2638d3606b8b966f2325e001f">libemb::TcpSocket::acceptConnection</a></div><div class="ttdeci">virtual bool acceptConnection(TcpSocket &amp;newSocket)</div><div class="ttdoc">TCP socket接受连接</div><div class="ttdef"><b>Definition:</b> Socket.cpp:804</div></div>
<div class="ttc" id="a_socket_8h_html_ad8f08be509aac52cd594cfb88a7b2fcaac8da34c8eadb05e544baedf8c2532fd6"><div class="ttname"><a href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fcaac8da34c8eadb05e544baedf8c2532fd6">libemb::CAN_FT_REMOTE</a></div><div class="ttdeci">@ CAN_FT_REMOTE</div><div class="ttdef"><b>Definition:</b> Socket.h:493</div></div>
<div class="ttc" id="a_socket_8h_html_a6cd27f32d9a678153aa8786a83489473a0844ba595fcce9692c0dfa1abb3bad45"><div class="ttname"><a href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473a0844ba595fcce9692c0dfa1abb3bad45">libemb::CAN_FE_ERR</a></div><div class="ttdeci">@ CAN_FE_ERR</div><div class="ttdef"><b>Definition:</b> Socket.h:503</div></div>
<div class="ttc" id="a_thread_8h_html"><div class="ttname"><a href="_thread_8h.html">Thread.h</a></div><div class="ttdoc">线程</div></div>
<div class="ttc" id="a_socket_8h_html_aa6016addaf077c4dd5dcf11f8def4169a1129ad1d72fa46342dc8832a051a72b5"><div class="ttname"><a href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a1129ad1d72fa46342dc8832a051a72b5">libemb::SOCKET_TYPE_MULTICAST</a></div><div class="ttdeci">@ SOCKET_TYPE_MULTICAST</div><div class="ttdef"><b>Definition:</b> Socket.h:68</div></div>
<div class="ttc" id="a_socket_8h_html_aa6016addaf077c4dd5dcf11f8def4169a2296d85c7a3c2e448263e386bcf3aff0"><div class="ttname"><a href="_socket_8h.html#aa6016addaf077c4dd5dcf11f8def4169a2296d85c7a3c2e448263e386bcf3aff0">libemb::SOCKET_TYPE_GROUPCAST</a></div><div class="ttdeci">@ SOCKET_TYPE_GROUPCAST</div><div class="ttdef"><b>Definition:</b> Socket.h:67</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html_a32a48b875a74cf0571f8d3a841a0271b"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html#a32a48b875a74cf0571f8d3a841a0271b">libemb::SocketCAN::recvFrame</a></div><div class="ttdeci">int recvFrame(CANFrame &amp;canFrame, int usTimeout=-1)</div><div class="ttdoc">接收帧</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1432</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_c_a_n_html_a96672c6ab59aa802b89dec841e06e3cf"><div class="ttname"><a href="classlibemb_1_1_socket_c_a_n.html#a96672c6ab59aa802b89dec841e06e3cf">libemb::SocketCAN::interface</a></div><div class="ttdeci">std::string interface()</div><div class="ttdoc">获取接口名称</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1387</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_socket_html_ac2c319002a9a7c2e945b9a337f79e031"><div class="ttname"><a href="classlibemb_1_1_udp_socket.html#ac2c319002a9a7c2e945b9a337f79e031">libemb::UdpSocket::sendData</a></div><div class="ttdeci">int sendData(const char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">UDP socket发送数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:676</div></div>
<div class="ttc" id="aclasslibemb_1_1_runnable_html"><div class="ttname"><a href="classlibemb_1_1_runnable.html">libemb::Runnable</a></div><div class="ttdoc">线程运行体,子类必须重写run方法.</div><div class="ttdef"><b>Definition:</b> Thread.h:44</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_server_html_a01676fb42c3309a6367f65486feb5db6"><div class="ttname"><a href="classlibemb_1_1_udp_server.html#a01676fb42c3309a6367f65486feb5db6">libemb::UdpServer::onNewDatagram</a></div><div class="ttdeci">virtual bool onNewDatagram(UdpSocket &amp;udpSocket, char *data, int len)=0</div><div class="ttdoc">接收数据报回调方法(子类必须实现)</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_socket_html_a194c4197a7db27728ec2ea239a5fb695"><div class="ttname"><a href="classlibemb_1_1_udp_socket.html#a194c4197a7db27728ec2ea239a5fb695">libemb::UdpSocket::readData</a></div><div class="ttdeci">int readData(char *buf, int len)</div><div class="ttdoc">读数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:536</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a17a82617775b44045f63455cbecf51e4"><div class="ttname"><a href="classlibemb_1_1_socket.html#a17a82617775b44045f63455cbecf51e4">libemb::Socket::getConnection</a></div><div class="ttdeci">virtual bool getConnection(std::string &amp;peerAddr, uint16 &amp;peerPort)</div><div class="ttdoc">获取连接(获取对端地址和端口)</div><div class="ttdef"><b>Definition:</b> Socket.cpp:470</div></div>
<div class="ttc" id="aclasslibemb_1_1_local_tcp_server_html_a12b9aed57b22af9959b34cd489e80369"><div class="ttname"><a href="classlibemb_1_1_local_tcp_server.html#a12b9aed57b22af9959b34cd489e80369">libemb::LocalTcpServer::setup</a></div><div class="ttdeci">bool setup(std::string serverName, uint16 serverPort, int maxPendings=1)</div><div class="ttdoc">本地TCP服务配置</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1108</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html_ae0c92ba7b884be4d9a35e6db4bf6332c"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html#ae0c92ba7b884be4d9a35e6db4bf6332c">libemb::CANFrame::type</a></div><div class="ttdeci">uint8 type()</div><div class="ttdoc">获取帧类型</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1343</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_socket_html_a7b4313971813566b203ad2cfc03278c0"><div class="ttname"><a href="classlibemb_1_1_tcp_socket.html#a7b4313971813566b203ad2cfc03278c0">libemb::TcpSocket::setConnection</a></div><div class="ttdeci">virtual bool setConnection(std::string peerAddr, uint16 peerPort)</div><div class="ttdoc">TCP socket连接远端</div><div class="ttdef"><b>Definition:</b> Socket.cpp:821</div></div>
<div class="ttc" id="a_socket_8h_html_afd4a8a04b314fddd93de6f9df6ce83fdadf4c53f6abb5e273e9c6c6e202e5e6e0"><div class="ttname"><a href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fdadf4c53f6abb5e273e9c6c6e202e5e6e0">libemb::CAN_FF_EXT</a></div><div class="ttdeci">@ CAN_FF_EXT</div><div class="ttdef"><b>Definition:</b> Socket.h:483</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html"><div class="ttname"><a href="classlibemb_1_1_socket.html">libemb::Socket</a></div><div class="ttdoc">Socket抽象基类</div><div class="ttdef"><b>Definition:</b> Socket.h:85</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_a66ff2090729e8c677b9b74a8109f5c5e"><div class="ttname"><a href="classlibemb_1_1_socket.html#a66ff2090729e8c677b9b74a8109f5c5e">libemb::Socket::open</a></div><div class="ttdeci">virtual bool open(std::string localAddr=&quot;&quot;, uint16 localPort=0)=0</div><div class="ttdoc">打开socket</div></div>
<div class="ttc" id="a_socket_8h_html_a6cd27f32d9a678153aa8786a83489473"><div class="ttname"><a href="_socket_8h.html#a6cd27f32d9a678153aa8786a83489473">libemb::CAN_FE_E</a></div><div class="ttdeci">CAN_FE_E</div><div class="ttdoc">CAN帧错误</div><div class="ttdef"><b>Definition:</b> Socket.h:501</div></div>
<div class="ttc" id="aclasslibemb_1_1_tcp_socket_html_a8c944c3e70eaef24dedfadf10c9a1116"><div class="ttname"><a href="classlibemb_1_1_tcp_socket.html#a8c944c3e70eaef24dedfadf10c9a1116">libemb::TcpSocket::close</a></div><div class="ttdeci">virtual bool close()</div><div class="ttdoc">关闭TCP socket</div><div class="ttdef"><b>Definition:</b> Socket.cpp:787</div></div>
<div class="ttc" id="a_socket_8h_html_ad8f08be509aac52cd594cfb88a7b2fcaa0ac739b57bc6d42d9ff382ede534f9f6"><div class="ttname"><a href="_socket_8h.html#ad8f08be509aac52cd594cfb88a7b2fcaa0ac739b57bc6d42d9ff382ede534f9f6">libemb::CAN_FT_DATA</a></div><div class="ttdeci">@ CAN_FT_DATA</div><div class="ttdef"><b>Definition:</b> Socket.h:492</div></div>
<div class="ttc" id="aclasslibemb_1_1_local_tcp_socket_html_a2c783361f400e753701d54d69388fd0c"><div class="ttname"><a href="classlibemb_1_1_local_tcp_socket.html#a2c783361f400e753701d54d69388fd0c">libemb::LocalTcpSocket::setConnection</a></div><div class="ttdeci">bool setConnection(std::string peerAddr, uint16 peerPort)</div><div class="ttdoc">连接本地socket</div><div class="ttdef"><b>Definition:</b> Socket.cpp:935</div></div>
<div class="ttc" id="a_base_type_8h_html_a57e803e49526dc5ba8c1915c68708ae0"><div class="ttname"><a href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a></div><div class="ttdeci">#define DECL_CLASSNAME(ClassName)</div><div class="ttdef"><b>Definition:</b> BaseType.h:176</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html_a5e7e0059049f843dd1c01ac8737268fe"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html#a5e7e0059049f843dd1c01ac8737268fe">libemb::CANFrame::id</a></div><div class="ttdeci">uint32 id()</div><div class="ttdoc">获取帧id(不包括标志位)</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1353</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_pair_html_a78c408b8e60c49e8543abe75ea8eeec6"><div class="ttname"><a href="classlibemb_1_1_socket_pair.html#a78c408b8e60c49e8543abe75ea8eeec6">libemb::SocketPair::sendData</a></div><div class="ttdeci">int sendData(const char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">发送数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1227</div></div>
<div class="ttc" id="aclasslibemb_1_1_udp_socket_html_a4f2044f857353eecec12865ea3fffc90"><div class="ttname"><a href="classlibemb_1_1_udp_socket.html#a4f2044f857353eecec12865ea3fffc90">libemb::UdpSocket::close</a></div><div class="ttdeci">bool close()</div><div class="ttdoc">关闭UDP socket</div><div class="ttdef"><b>Definition:</b> Socket.cpp:531</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html_a876fcebd111b67cbdb9f41a66722915f"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html#a876fcebd111b67cbdb9f41a66722915f">libemb::CANFrame::data</a></div><div class="ttdeci">char * data()</div><div class="ttdoc">获取帧数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1374</div></div>
<div class="ttc" id="aclasslibemb_1_1_local_tcp_socket_html_a001362c03715e2a34e3efca0483508ab"><div class="ttname"><a href="classlibemb_1_1_local_tcp_socket.html#a001362c03715e2a34e3efca0483508ab">libemb::LocalTcpSocket::open</a></div><div class="ttdeci">bool open(std::string localSocketName=&quot;&quot;, uint16 localPort=0)</div><div class="ttdoc">打开本地socket</div><div class="ttdef"><b>Definition:</b> Socket.cpp:893</div></div>
<div class="ttc" id="a_thread_util_8h_html"><div class="ttname"><a href="_thread_util_8h.html">ThreadUtil.h</a></div><div class="ttdoc">线程工具</div></div>
<div class="ttc" id="aclasslibemb_1_1_c_a_n_frame_html"><div class="ttname"><a href="classlibemb_1_1_c_a_n_frame.html">libemb::CANFrame</a></div><div class="ttdoc">CAN帧</div><div class="ttdef"><b>Definition:</b> Socket.h:512</div></div>
<div class="ttc" id="a_base_type_8h_html_addd0d1ba39d05a893db9eba78123ee5a"><div class="ttname"><a href="_base_type_8h.html#addd0d1ba39d05a893db9eba78123ee5a">libemb::uint8</a></div><div class="ttdeci">unsigned char uint8</div><div class="ttdef"><b>Definition:</b> BaseType.h:74</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_pair_html_aad72de25942fecf8acd46c1b5da3b753"><div class="ttname"><a href="classlibemb_1_1_socket_pair.html#aad72de25942fecf8acd46c1b5da3b753">libemb::SocketPair::recvData</a></div><div class="ttdeci">int recvData(char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">接收数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1180</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_pair_html_aaac5188895918b4eb0acab1e8d055de0"><div class="ttname"><a href="classlibemb_1_1_socket_pair.html#aaac5188895918b4eb0acab1e8d055de0">libemb::SocketPair::fd</a></div><div class="ttdeci">int fd(int pairType)</div><div class="ttdoc">获取套接字描述符</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1166</div></div>
<div class="ttc" id="a_socket_8h_html_afd4a8a04b314fddd93de6f9df6ce83fda0bd4206f31c71fa2b710aa89781d8ab4"><div class="ttname"><a href="_socket_8h.html#afd4a8a04b314fddd93de6f9df6ce83fda0bd4206f31c71fa2b710aa89781d8ab4">libemb::CAN_FF_STD</a></div><div class="ttdeci">@ CAN_FF_STD</div><div class="ttdef"><b>Definition:</b> Socket.h:482</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_pair_html_ad4f3980a76dc4294661ecf69be060eeb"><div class="ttname"><a href="classlibemb_1_1_socket_pair.html#ad4f3980a76dc4294661ecf69be060eeb">libemb::SocketPair::createPair</a></div><div class="ttdeci">bool createPair()</div><div class="ttdoc">创建套接字对</div><div class="ttdef"><b>Definition:</b> Socket.cpp:1153</div></div>
<div class="ttc" id="aclasslibemb_1_1_socket_html_afdc396d85918fa1244322275d5612eca"><div class="ttname"><a href="classlibemb_1_1_socket.html#afdc396d85918fa1244322275d5612eca">libemb::Socket::sendData</a></div><div class="ttdeci">virtual int sendData(const char *buf, int len, int usTimeout=-1)</div><div class="ttdoc">socket发送数据</div><div class="ttdef"><b>Definition:</b> Socket.cpp:312</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
